package com.oscar.web.domain;

import org.hibernate.annotations.Proxy;

import javax.persistence.*;
import java.sql.Date;

@Entity
@Proxy(lazy = false)
public class rating {


    @Column(nullable = false,name = "userid")
    private int userId;

    @Column(nullable = false,name = "bookid")
    private int bookId ;

    @Column(nullable = false)
    Integer score;   //用户对该书的打分情况

    @Id
    @Column(nullable = false)
    private int  timestamp ;

    //get，set方法


    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public int getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(int timestamp) {
        this.timestamp = timestamp;
    }
}
